<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0,minimum-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>人力资源服务机构登记信息名录</title>
	<link rel="stylesheet" href="./common/styles/common.css">
	<style>
		/* html,
		body {
			background-color: #ffffff;
		} */
		input,
		button {
			-webkit-appearance: none;
			outline: none;
			border-radius: 0;
		}

		.w_header {
			width: 100%;
			height: 3rem;
			line-height: 3rem;
			background-color: #1c5ec3;
			color: #fff;
			font-size: 1rem;
			font-weight: normal;
			text-align: center;
		}

		.w_header a {
			position: absolute;
			top: 0;
			left: 0;
			z-index: 2;
			font-family: '宋体';
			font-size: 1.4rem;
			color: #ffffff;
			width: 2rem;
			height: 3rem;
			text-align: center;
			margin-left: 0.5rem;
		}

		.w_search {
			width: 90%;
			margin: 1rem auto 1.2rem;
		}

		.w_search .w_search_input {
			color: #999999;
			font-size: 0.8rem;
			text-indent: 1em;
			width: 80%;
			height: 2rem;
			padding:0.5rem 0;
			border: 1px solid #cccccc;
			-webkit-box-sizing: border-box;
			box-sizing: border-box;
			vertical-align: top;
		}

		.w_search button {
			padding: 0;
			width: 20%;
			height: 2rem;
			line-height: 2rem;
			text-align: center;
			border: 1px solid #cccccc;
			border-left: 0;
			background-color: #e0dddd;
			-webkit-box-sizing: border-box;
			box-sizing: border-box;
			font-size: 0.8rem;
		}

		.w_list {
			background-color: #ffffff;
			padding-bottom: 1rem;
		}

		.w_list a {
			display: block;
			padding: 0.8rem 0.8rem 0;
			border-bottom: 1px dashed #cccccc;
			-webkit-box-sizing: border-box;
			box-sizing: border-box;
			font-size: 0.8rem;
		}

		.w_item_div {
			margin-bottom: 0.8rem;
		}

		.w_item_div .w_mc,
		.w_item_div .w_bh {
			color: #ff0000;
			line-height: 1rem;
		}

		.w_item_div .w_mc {
			width: 80%;
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap
		}

		.w_item_div .w_ck {
			color: #0066ff;
			line-height: 1rem;
		}

		.input_form {
			display: block;
			width: 100%;
			position: relative;
			height: 2rem;
		}

		.error_info {
			position: absolute;
			top: 2.2rem;
			left: 0;
			z-index: 2;
			font-size: 0.6rem;
			color: #fe9674;
		}
	</style>
</head>

<body>
	<div class="w_header clearfix">
		<!-- <a class="w_back"><</a> -->
		机构查询
	</div>
	<div class="w_con">
		<div class="w_search clearfix">
			<form name="input_form" msgtype="2" validate="blur" class="input_form">
				<input class="w_search_input left" type="text" id="rs" placeholder="请输入机构名称" valiflag="50,full,机构名称">
				<button class="left J_btn">搜索</button>
			</form>
		</div>
		<div class="w_list" id="resultpage_table">
			<script type="text/html" id="resultpage_area">
				<% var _data = data.data%>
				<%for(var i=0;i<_data.length;i++){%>
			<a href="javascript:void(0);" class="w_list_item" bh='<%=_data[i].bh%>'>
				<div class="w_item_top w_item_div clearfix">
					<span class="w_mc left"><%=_data[i].jgmc%></span>
					<span class="w_ck right">查看详情</span>
				</div>
				<div class="w_item_bottom w_item_div clearfix">
					<span class="w_wh left">许可文号：<%=_data[i].babh%></span>
					<span class="w_bh right"><%=_data[i].gkfwdh%></span>
				</div>
			</a>
			<%}%>
		</script>
		</div>
	</div>
</body>
<script src="./common/js/vendor.js"></script>
<script src="./common/js/common.js"></script>
<script src="./common/js/generaltools.js"></script>
<script src="./common/js/validator.js"></script>
<script>
	$(function () {
		function getRem(pwidth, prem) {
			var html = document.getElementsByTagName('html')[0];
			var oWidth = document.body.clientWidth || document.documentElement.clientWidth;
			html.style.fontSize = oWidth / pwidth * prem + 'px';
		}
		$(window).resize(function () {
			getRem(1920, 100);
		});
		getRem(1920, 100);
		// 如果没有的话
		var inval = $.paramObj().inval || '';
		$('.w_search_input').val(inval);
		pageOrder(inval);
		function pageOrder(_gjc) {
			var _gjc = _gjc || '';
			var index = 0;
			var data = {
				jgmc: _gjc,
				pageSize: 10,
				pageNum: index
			}
			$('#resultpage_table').pageTool({
				url: '/jgml/rlzyfwjg',
				type: 'get',
				data: data,
				locator: 'returnData',
				prevText: '<',
				nextText: '>',
				callback: function (result) {
					var msg = result.returnData;
					if (msg.executeResult == '1') {
						index++;
					} else {
						$.layerMsg(msg.message, '我知道了', function () {
							// window.location.href = './index.html';
							return false;
						});
					}
				}
			});
		}
		$(document).on('click', '.w_list a', function () {
			var bn = $(this).attr('bh');
			window.location.href = "./detail.html?bh=" + bn;
		});
		$(document).on('click', '.J_btn', function () {
			if (!validate('input_form')) {return false};
			var inval = $('.w_search_input').val();
			pageOrder(inval);
			return false;
		})
	});
</script>

</html>
